package com.johnny.xia.util.base;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;

/**
 * @ClassName StringUtil
 * @Author johnny xia
 * @mailto johnny.xia@qq.com
 * @Date 2021/1/20 4:31 下午
 * @Description TODO
 **/
public class StringUtil {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String[] tmp = new String[]{"abc","a bc","ab7","你aaa","(9（"};
        for(String t : tmp){
            System.out.println(t.getBytes("GB2312").length);
        }
    }
}
